package com.stox.client.ui.javafx.launcher;

import javafx.application.Application;
import javafx.geometry.Rectangle2D;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.stage.Screen;
import javafx.stage.Stage;

public class StoxUiJavaFXApplication extends Application {

	@Override
	public void start(Stage primaryStage) throws Exception {
		Rectangle2D rectangle = Screen.getPrimary().getVisualBounds();
		primaryStage.setX(rectangle.getMinX());
		primaryStage.setY(rectangle.getMinY());
		primaryStage.setWidth(rectangle.getWidth());
		primaryStage.setHeight(rectangle.getHeight());
		
		Group group = new Group();
		Scene scene  = new Scene(group, primaryStage.getWidth(),primaryStage.getHeight(), Color.BLACK);
		primaryStage.setScene(scene);
		
		primaryStage.show();
	}
	
	public static void main(String[] args) {
		Thread.currentThread().setContextClassLoader(
				new StoxJavaFxClassLoader(
						Thread.currentThread().getContextClassLoader()));
		launch(args);
	}

}
